<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>职管用管理端平台</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="description" content="">
        <meta name="keywords" content="coco bootstrap template, coco admin, bootstrap,admin template, bootstrap admin,">
        <meta name="author" content="Huban Creative">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <!-- Base Css Files -->
        <link href="<?php echo __BOOTSTRAP__;?>css/bootstrap.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>fontello/css/fontello.css" rel="stylesheet" />

        <!-- Extra CSS Libraries Start -->
        <link href="<?php echo __CSS__;?>style.css" rel="stylesheet" type="text/css" />
        <!-- Extra CSS Libraries End -->

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

        <link rel="shortcut icon" href="<?php echo __IMG__;?>Besiness/favicon.ico">
    </head>

    <body>
        <!-- Start content-->
        <div class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="widget">
                        <div class="widget-header transparent">
                            <h2><strong>企业申请信息</strong></h2>
                        </div>
                        <form action="" method="post" >
                            <div class="data-table-toolbar table-size">                            
                                <label class="table-select">企业名称：</label>
                                <input type="text" name="keywords" class="form-control" placeholder="企业名称" />
                                <input type="hidden" name="p" value="1" />
                                <label class="table-select">门店名称：</label>
                                <input type="text" name="sname" class="form-control" placeholder="门店名称" />
                            </div>
                            <div class="data-table-toolbar table-size"> 
                                <label class="table-select">任务名称：</label>
                                <input type="text" name="tname" class="form-control" placeholder="任务名称" />
                                <label class="table-select">联系人：</label>
                                <input type="text" name="linkman" class="form-control" placeholder="联系人" />
                                <button type="submit" class="table-select btn btn-success">查询</button>
                            </div>
                        </form>
                        <div class="table-responsive">
                            <table class="table table-hover table-striped">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>企业名称</th>
                                        <th>门店名称</th>
                                        <th>任务名称</th>
                                        <th>联系人姓名</th>
                                        <th>联系电话</th>
                                        <th>地址</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php if(empty($data)): ?><tr><td colspan="9">暂时没有任务信息！</td></tr>
                                    <?php else: endif; ?>
                                <?php if(is_array($data)): foreach($data as $key=>$v): ?><tr>
                                        <td><?php echo ($v["bus_id"]); ?></td>
                                        <td><?php echo ($v["fullname"]); ?></td>
                                        <td><?php echo ($v["sname"]); ?></td>
                                        <td><?php echo ($v["tname"]); ?></td>
                                        <td><?php echo ($v["linkman"]); ?></td>
                                        <td><?php echo ($v["linktel"]); ?></td>
                                        <td><?php echo ($v["province"]); ?>-<?php echo ($v["city"]); ?>-<?php echo ($v["district"]); ?></td>
                                        <td class="red-state">
                                    <?php if(0 == $v['status']){ $cls = 'default'; $txt = '已禁用'; } else { $cls = 'success'; $txt = '已启用'; } ?>
                                    <span class="label label-<?php echo ((isset($cls) && ($cls !== ""))?($cls):'success'); ?>"><?php echo ($txt); ?></span>
                                    </td>
                                    <td>
                                        <div class="btn-group btn-group-xs">
                                            <a href="<?php echo U('task_spot',array('tid'=>$v['tid']));?>" tit="查看" class="btn btn-default"><i class="fa fa-search-plus"></i></a>
                                            <?php switch($v['status']){ case 1: $tit = '禁用'; $start = 'disable'; break; case 0: $tit = '启用'; $start = 'start'; break; default: $tit = '启用'; $start = 'start'; break; } ?>
                                            <a tit="<?php echo ($tit); ?>" data-start="<?php echo U('Admin/task/do_start');?>" data-disable="<?php echo U('Admin/task/do_disable');?>" class="btn btn-default" data-bind="<?php echo ($v["tid"]); ?>" data-url="<?php if($start == "start"): echo U('Admin/Task/do_start'); else: echo U('Admin/task/do_disable'); endif; ?>">                                            
                                                <?php if($v["status"] == 0): ?><i class="fa fa-check-circle-o" ></i>                                                    
                                                    <?php else: ?>
                                                    <i class="fa fa-ban"></i><?php endif; ?>
                                            </a>
                                            <!--<a tit="<?php echo ($txt); ?>" class="btn btn-default"><i class="fa fa-check-circle-o"></i></a>
                                            <a tit="<?php echo ($txt); ?>" class="btn btn-default"><i class="fa fa-ban"></i></a>-->
                                          <!--  <a tit="重置密码" class="btn btn-default" data-bind="<?php echo ($v["bus_id"]); ?>" data-url="<?php echo U('/Company/do_reset');?>"><i class="icon icon-lock-1"></i></a>-->
                                        </div>
                                    </td>
                                    </tr><?php endforeach; endif; ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="my_page"><?php echo ($page); ?></div>
                    </div>
                </div>
            </div
            <!-- Footer Start -->
            <div class="footer">Copyright &copy; 2016 河南职管用信息技术有限公司</div>
            <!-- Footer End -->
        </div>
        <script type="text/javascript" src="<?php echo __LIBS__;?>jquery/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="<?php echo __LIBS__;?>layer/layer.js"></script>
        <script type="text/javascript" src="<?php echo __JS__;?>common.js"></script>
    </body>

</html>